package com.zhuliwei.cloud.apis;

import com.zhuliwei.cloud.resp.ResultData;
import com.zhuliwei.cloud.resp.ReturnCodeEnum;
import org.springframework.stereotype.Component;

/**
 * 配置全局统一服务出现异常后的的统一降级处理
 *
 * @author 朱力维
 * @time 2025/1/24 18:45
 **/
@Component
public class PayFeignSentinelApiFallBack implements PayFeignSentinelApi{
    @Override
    public String getPayInfo(Integer id) {
        return "对方服务宕机或不可用，FallBack服务降级o(╥﹏╥)o";
    }

    @Override
    public ResultData getPayByOrderNo(String orderNo) {
        return ResultData.fail(ReturnCodeEnum.RC500.getCode(),"对方服务宕机或不可用，FallBack服务降级o(╥﹏╥)o");
    }

}
